package org.softmed.rest.server.test.creators.testcases.parameters;

import org.restlet.data.Response;
import org.restlet.data.Status;
import org.softmed.rest.server.test.creators.AbstractTestCaseCreator;

public class PostWrongXMLNewObject extends AbstractTestCaseCreator {

	@Override
	public String testCase(String uri, String elementURI) throws Throwable {

		Response response = creator.postRelativeXML("<xptowazza666 />");

//		setupXMLDoc();

		if (!response.getStatus().equals(Status.CLIENT_ERROR_BAD_REQUEST))
			return elementURI;

//		if (doc != null && doc.getDocumentElement() != null)
//			return elementURI;

		creator.getTestCase().setSucess(true);

		return elementURI;
	}

}
